import React from 'react';
import '../css/me.css';
import '../css/setput.css';
// import $ from 'jquery';
// import {BrowserRouter as Router,Route,NavLink,Prompt} from 'react-router-dom';
function getCookie(name){
	var str = document.cookie;
	var arr = str.split("; ");
	for(var i = 0; i < arr.length; i++){
		var arr1 = arr[i].split("=");
		if(arr1[0]==name){
			return arr1[1];
		}
	}
}
function setCookie(name,val,n){
	var oDate = new Date();
	oDate.setDate(oDate.getDate()+n);
	document.cookie = name + "=" + val + ";expires="+ oDate ;
}
function removeCookie(name){
	setCookie(name,1,-1);
}

class Setput extends React.Component{
	constructor(props){
		super(props)
		this.state={
			list:[],
			isshow:false
		}
	}
	goback(){
		this.props.history.push('/mycenter')
	}
	atc(){
		alert("退出成功，欢迎下次登录")
		removeCookie("token")
		removeCookie("mingzi")
		window.location.reload()

		window.location.href="#/login"	

		}
	
	
	render(){
		return(
			<div className='setput'>
				<h1>
					<span onClick={this.goback.bind(this)}>&lt;</span>
					设置
				</h1>

				<ul>
					<li>
						<span>设置昵称</span>
						<span>></span>
					</li>
					<li>
						<span>企业信息</span>
						<span>></span>
					</li>
					<li>
						<span>修改密码</span>
						<span>></span>
					</li>

                    <li>
						<span>清除缓存</span>
						<span>></span>
					</li>
					<li>
						<span>版本信息</span>
						<span>></span>
					</li>

                    <li>
						<span>意见反馈</span>
						<span>></span>
					</li>
                    <button onClick={this.atc.bind(this)}>退出登录</button>
				</ul>
                

                
				{/* <ul>
					<li>
						<span>清除缓存</span>
						<span>></span>
					</li>
					<li>
						<span>版本信息</span>
						<span>></span>
					</li>
				</ul>

                <ul>
					<li>
						<span>意见反馈</span>
						<span>></span>
					</li>
				</ul> */}
			</div>	
        )
    }

}
export default Setput